package com.it.deliveryaddress.mapper;

import com.it.common.entity.DeliveryAddress;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface DeliveryAddressMapper {
    List<DeliveryAddress> listDeliveryAddressByUserId(String userId);

    Integer saveDeliveryAddress(DeliveryAddress deliveryAddress);

    Integer getNewDaId();

    Integer removeDeliveryAddress(Integer daId);


//    @Select("select * from deliveryAddress where daId=#{daId}")
     DeliveryAddress getDeliveryAddressById(Integer daId);



//    @Update("update deliveryAddress set contactName=#{contactName},contactSex=#
//            {contactSex},contactTel=#{contactTel},address=#{address} where daId=#{daId}")
    Integer updateDeliveryAddress(DeliveryAddress deliveryAddress);

}
